<?php

/**
 * Homework form.
 *
 * @package    elearning
 * @subpackage form
 * @author     Your name here
 */
class HomeworkForm extends BaseHomeworkForm
{
  public function configure()
  {
	/*-------------------------------------------------------------------
	 * Reset attribute fields
	 -------------------------------------------------------------------*/
  	//Description
  	$this->widgetSchema['hw_description']	=	new sfWidgetFormTextarea(array(),array("rows" => 5,"cols" => 100));
	//Link
	$this->widgetSchema['hw_link']	=	new sfWidgetFormInput(array(),array('size'=>60));
	
	$homework = $this->getObject();
	if( $homework->getHwStatus() == 0 )
		$homework->setHwStatus(NULL);
	$this->widgetSchema['hw_status'] = new sfWidgetFormInputCheckbox(array("value_attribute_value" => 1),array('value' => 1));
	
	unset( $this['create_at'],  $this['update_at'] );
	$this->setDefaults( array('create_at' => time(), 'update_at' => time() ) );
  }
}
